const express = require('express');
const proxy = require('express-http-proxy');

const app = express();

app.use(express.static('./'));
app.use(
    '/ad-admin',
    // proxy('http://192.168.79.154:8080', {
    proxy('http://admin-qa.baiwandian.cn', {
        proxyReqPathResolver: function (req) {
            return `/ad-admin${require('url').parse(req.url).path}`;
        }
    })
);

app.listen(9000);

console.log('lisen 9000...');
